import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/api/info',
    method: 'get'
    // params: { token }
  })
}

export function logout() {
  return request({
    url: '/api/logout',
    method: 'post'
  })
}

export function register(data) {
  return request({
    url: '/api/register',
    method: 'post',
    data
  })
}

export function queryAllUser() {
  return request({
    url: '/api/queryUser',
    method: 'get',
  })
}
export function querySingleUser(data) {
  return request({
    url: '/api/queryUser',
    method: 'post',
    data
  })
}

export function editPower(data) {
  return request({
    url: '/api/editPower',
    method: 'post',
    data
  })
}

export function sendCode(data){
  return request({
    url: '/api/send_code',
    method: 'post',
    data
  })
}
export function sendMsg(data){
  return request({
    url: '/api/sendMsg',
    method: 'post',
    data
  })
}
export function getEmail(data){
  return request({
    url: '/api/getEmail',
    method: 'post',
    data
  })
}

export function resetPassword(data){
  return request({
    url: '/api/rePassword',
    method: 'post',
    data
  })
}

export function resetEmail(data){
  return request({
    url: '/api/resetEmail',
    method: 'post',
    data
  })
}

